package com.pig4cloud.pig.qc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.pig.common.security.util.SecurityUtils;
import com.pig4cloud.pig.qc.entity.OrderEntity;
import com.pig4cloud.pig.qc.mapper.OrderMapper;
import com.pig4cloud.pig.qc.service.OrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 *
 * @author QC
 * @date 2025-07-28 11:12:14
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderEntity> implements OrderService {
	@Autowired
	private OrderMapper orderMapper;
	@Override
	public IPage<OrderEntity> getOrderPage(Page page,OrderEntity order) {
		return orderMapper.selectOrderPage(page, order);
	}


	@Override
	public void addOrder(OrderEntity order) {
	 	orderMapper.insertOrder(order);
	}

	@Override
	public void updateInfo(OrderEntity order) {
		orderMapper.updateInfo(order);
	}

	@Override
	public Long getInfoIdByCarCode(String carCode) {
		return orderMapper.selectInfoIdByCarCode(carCode);
	}

	@Override
	public List<String> getCustomerNameList() {
		return orderMapper.selectCustomerNameList();
	}

	@Override
	public List<OrderEntity> getCarCodeList() {
		return orderMapper.selectCarCodeList();
	}
}
